<%@ page import="com.oval.util.JspHelper" %>
<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="com.oval.util.FileWatchDog" %>
<%@ page import="com.oval.foundation.DefaultParams" %>
<% 
   String strIsSubmit=(String)request.getParameter("issubmit");
   String strLiteOrgId=DefaultParams.findParam("LiteOrgId");
   
   String strPrintServerName=DefaultParams.findParam("printserver");
   String strPrintServerPort=DefaultParams.findParam("printserverport");
   
   String strMessage="";
   if(strIsSubmit!=null && strIsSubmit.equalsIgnoreCase("Y"))
   {
      if(request.getParameter("LiteOrgId")!=null && ((String)request.getParameter("LiteOrgId")).length()>0)
      {
        String strLiteOrgIdTmp=(String) request.getParameter("LiteOrgId");
        try
        {
          Integer oId=new Integer(strLiteOrgIdTmp);
          strLiteOrgId=oId.toString();
          DefaultParams.setParam("LiteOrgId",strLiteOrgId);
          com.oval.util.ConstantProp.LITE_ORG_ID=oId.intValue();
        }
        catch(Exception ex)
        {
          strMessage="LiteOrgId "+strLiteOrgIdTmp +" Error:"+ex;
        }
          
      }
      
      if(request.getParameter("PrintServerName")!=null && request.getParameter("PrintServerPort")!=null)
      {
        String strPrintServerNameTmp=(String)request.getParameter("PrintServerName");
        String strPrintServerPortTmp=(String)request.getParameter("PrintServerPort");
        if(strPrintServerNameTmp.length()>0 && strPrintServerPortTmp.length()>0)
        {
          try
          {
            Integer.parseInt(strPrintServerPortTmp);
            DefaultParams.setParam("printserver",strPrintServerNameTmp);
            DefaultParams.setParam("printserverport",strPrintServerPortTmp);
            strPrintServerName=strPrintServerNameTmp;
            strPrintServerPort=strPrintServerPortTmp;
          }
           catch(Exception ex)
          {
            strMessage="Print Server Port "+strPrintServerPortTmp +" Error:"+ex;
          }
        }
        
      }
   }
    
%>
<html>
<head>
<title></title>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="css/chinese/csscontent.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<form name="cform" method="post" action="SetLiteOrgId.jsp">
<input type="hidden" name="issubmit" value="Y">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td background="images/chinese/title_bg.gif"><img src="images/chinese/title_bg.gif" width="3" height="29"></td>
  </tr>
</table>

<table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="#999999">
  <tr> 
    <td colspan="2" class="td_title_bg">
      <img src="images/chinese/arrow2.gif">Set Lite Org ID :</img>
    </td>
  </tr>
  <%if(strMessage!=null && strMessage.length()>0){%>
  <tr>
    <td colspan="2" >
      <font color="red" ><%=JspHelper.filterNull(strMessage)%></font>
    </td>
  </tr>
  <%}%>  
  
  <tr class="td_bg_row">
    <td class="td_right">LiteOrgId:</td>
    
    <td ><input type="text" name="LiteOrgId" value="<%=JspHelper.filterNull(strLiteOrgId)%>"/></td>
  </tr>
  <tr> 
    <td colspan="2" class="td_title_bg">
      <img src="images/chinese/arrow2.gif">Set Print Server Info:</img>
    </td>
  </tr>
   <tr class="td_bg_row">
    <td class="td_right">Print Server Name (Or IP):</td>
    
    <td ><input type="text" name="PrintServerName" value="<%=JspHelper.filterNull(strPrintServerName)%>"/></td>
  </tr>
   <tr class="td_bg_row">
    <td class="td_right">Print Server Port:</td>
    
    <td ><input type="text" name="PrintServerPort" value="<%=JspHelper.filterNull(strPrintServerPort)%>"/></td>
  </tr>
 <tr class="td_bg1">
    <td class="td_center" colspan="2">
        <INPUT TYPE="submit" name="submit" value="Submit">
    </td> 
 </tr>
</table>

</body>
</html>

